﻿// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_MST_CODE_RULE
// * CreateDate    : 2011/8/12 11:25:13
// * Creater       : CodeSmith
// * LastChangeDate: 2011/8/12 11:25:13
// * LastChanger   : 2011/8/12 11:25:13
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
    [Serializable]
    public partial class MstCodeRuleEntity : EntityBase
    {
        public MstCodeRuleTable TableSchema
        {
            get
            {
                return MstCodeRuleTable.Current;
            }
        }

        public MstCodeRuleEntity()
        {

        }

        public MstCodeRuleEntity(DataRow dr)
        {
            if (dr == null)
            {
                return;
            }
            this.CodeType = Convert.ToString(CommonFunctions.ToObject(dr["CODE_TYPE"]));
            this.CodeName = Convert.ToString(CommonFunctions.ToObject(dr["CODE_NAME"]));
            this.CodePrefix = Convert.ToString(CommonFunctions.ToObject(dr["CODE_PREFIX"]));
            this.CodeDateFormat = Convert.ToString(CommonFunctions.ToObject(dr["CODE_DATE_FORMAT"]));
            this.CodeSeqLen = Convert.ToInt32(CommonFunctions.ToObject(dr["CODE_SEQ_LEN"]));
            this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
            this.CurrentValue = Convert.ToInt32(CommonFunctions.ToObject(dr["CURRENT_VALUE"]));
            this.CurrentDay = Convert.ToString(CommonFunctions.ToObject(dr["CURRENT_DAY"]));
        }

        public MstCodeRuleEntity(DataRowView dr)
        {
            if (dr == null)
            {
                return;
            }
            this.CodeType = Convert.ToString(CommonFunctions.ToObject(dr["CODE_TYPE"]));
            this.CodeName = Convert.ToString(CommonFunctions.ToObject(dr["CODE_NAME"]));
            this.CodePrefix = Convert.ToString(CommonFunctions.ToObject(dr["CODE_PREFIX"]));
            this.CodeDateFormat = Convert.ToString(CommonFunctions.ToObject(dr["CODE_DATE_FORMAT"]));
            this.CodeSeqLen = Convert.ToInt32(CommonFunctions.ToObject(dr["CODE_SEQ_LEN"]));
            this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
            this.CurrentValue = Convert.ToInt32(CommonFunctions.ToObject(dr["CURRENT_VALUE"]));
            this.CurrentDay = Convert.ToString(CommonFunctions.ToObject(dr["CURRENT_DAY"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return MstCodeRuleTable.Current;
            }
        }

        #region Perporty List
        public string CodeType
        {
            get { return Convert.ToString(GetData(MstCodeRuleTable.C_CODE_TYPE)); }
            set { SetData(MstCodeRuleTable.C_CODE_TYPE, value); }
        }

        public string CodeName
        {
            get { return Convert.ToString(GetData(MstCodeRuleTable.C_CODE_NAME)); }
            set { SetData(MstCodeRuleTable.C_CODE_NAME, value); }
        }

        public string CodePrefix
        {
            get { return Convert.ToString(GetData(MstCodeRuleTable.C_CODE_PREFIX)); }
            set { SetData(MstCodeRuleTable.C_CODE_PREFIX, value); }
        }

        public string CodeDateFormat
        {
            get { return Convert.ToString(GetData(MstCodeRuleTable.C_CODE_DATE_FORMAT)); }
            set { SetData(MstCodeRuleTable.C_CODE_DATE_FORMAT, value); }
        }

        public int CodeSeqLen
        {
            get { return Convert.ToInt32(GetData(MstCodeRuleTable.C_CODE_SEQ_LEN)); }
            set { SetData(MstCodeRuleTable.C_CODE_SEQ_LEN, value); }
        }

        public string Remark
        {
            get { return Convert.ToString(GetData(MstCodeRuleTable.C_REMARK)); }
            set { SetData(MstCodeRuleTable.C_REMARK, value); }
        }

        public int CurrentValue
        {
            get { return Convert.ToInt32(GetData(MstCodeRuleTable.C_CURRENT_VALUE)); }
            set { SetData(MstCodeRuleTable.C_CURRENT_VALUE, value); }
        }

        public string CurrentDay
        {
            get { return Convert.ToString(GetData(MstCodeRuleTable.C_CURRENT_DAY)); }
            set { SetData(MstCodeRuleTable.C_CURRENT_DAY, value); }
        }

        #endregion
    }


}

